package com.xw.smsService.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.xw.smsService.mapper.SmsSendMapper;
import com.xw.smsService.model.SmsSend;
import com.xw.smsService.service.SmsSendService;
/**
 * 短信发送实现类
 * @author xiaoshengda
 *
 * @date 创建时间：2018年4月1日 上午11:55:55
 */
@Service
public class SmsSendServiceImpl implements SmsSendService{
    @Autowired
    private SmsSendMapper smsSendMapper;
	@Override
	@Transactional(propagation = Propagation.REQUIRED)
	public void insert(SmsSend smsSend) {
		this.smsSendMapper.insert(smsSend);
	}
	/**
	 * xiaoshengda
	 */
	@Override
	public SmsSend loadByReceivePhone(Long smsSendId) {
		return this.smsSendMapper.loadByReceivePhone(smsSendId);
	}

	@Override
	@Transactional(propagation = Propagation.REQUIRED)
	public void update(SmsSend smsSend) {
		this.smsSendMapper.update(smsSend);
	}

}
